package com.syq.feign.service;


import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
class PersonalServiceFallbackFactory implements FallbackFactory<PersonalFeignService>
{
    @Override
    public PersonalFeignService create(Throwable throwable)
    {
        return new PersonalFeignService() {
            public String getAllPersonals(){
                String message = "网络繁忙，请稍后再试-_-。PS：服务消费者自己提供的信息";
                return message;
            }

            @Override
            public String getPersonalByPno(String pno) {
                String message = "网络繁忙，这会查询的人太多请稍等";
                return message;
            }

        };
    }
}